<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var str = '改革春风吹满地，春天来了';

        //indexOf
        console.log(str.indexOf('春'));
        console.log(str.indexOf('春',3));//指定索引查找

        //lastindexOf
        
    </script>
</body>
</html>